<template>
	<el-container style="height: 800px; border: 1px solid #8c8c8c">
		<el-aside width="200px" style="background-color: #8c8c8c)">
			<el-menu :default-openeds="['1']" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
				<el-submenu index="1">
					<template slot="title"><i class="el-icon-message"></i>设备管理</template>
					<el-menu-item index="1-1" @click="findEquipment">查看所有设备</el-menu-item>
					<el-menu-item index="1-2" @click="addEquipments">添加设备信息</el-menu-item>
					<el-menu-item index="1-3" @click="updateEquipment">更改设备信息</el-menu-item>
					<el-menu-item index="1-4" @click="underEquipment">下架设备</el-menu-item>
					<el-menu-item index="1-5" @click="upEquipment">上架设备</el-menu-item>
					<el-menu-item index="1-6" @click="findEquipmentById">输入设备编号查看</el-menu-item>
					<el-menu-item index="1-7" @click="findByExample">分类查看设备</el-menu-item>
					<el-menu-item index="1-8" @click="deleteEquipment">删除设备</el-menu-item>
					<!-- <el-menu-item-group>
	          <template slot="title">分组一</template>
	          <el-menu-item index="1-1">选项1</el-menu-item>
	          <el-menu-item index="1-2">选项2</el-menu-item>
	        </el-menu-item-group>
	        <el-menu-item-group title="分组2">
	          <el-menu-item index="1-3">选项3</el-menu-item>
	        </el-menu-item-group>
	        <el-submenu index="1-4">
	          <template slot="title">选项4</template>
	          <el-menu-item index="1-4-1">选项4-1</el-menu-item>
	        </el-submenu> -->
				</el-submenu>
				<el-submenu index="2">
					<template slot="title"><i class="el-icon-menu"></i>用户管理</template>
					<el-menu-item-group>
						<template slot="title">分组一</template>
						<el-menu-item index="2-1">选项1</el-menu-item>
						<el-menu-item index="2-2">选项2</el-menu-item>
					</el-menu-item-group>
					<el-menu-item-group title="分组2">
						<el-menu-item index="2-3">选项3</el-menu-item>
					</el-menu-item-group>
					<el-submenu index="2-4">
						<template slot="title">选项4</template>
						<el-menu-item index="2-4-1">选项4-1</el-menu-item>
					</el-submenu>
				</el-submenu>
				<el-submenu index="3">
					<template slot="title"><i class="el-icon-setting"></i>公告管理</template>
					<el-menu-item-group>
						<template slot="title">分组一</template>
						<el-menu-item index="3-1">选项1</el-menu-item>
						<el-menu-item index="3-2">选项2</el-menu-item>
					</el-menu-item-group>
					<el-menu-item-group title="分组2">
						<el-menu-item index="3-3">选项3</el-menu-item>
					</el-menu-item-group>
					<el-submenu index="3-4">
						<template slot="title">选项4</template>
						<el-menu-item index="3-4-1">选项4-1</el-menu-item>
					</el-submenu>
				</el-submenu>
			</el-menu>
		</el-aside>

		<el-container >
			<el-header style="text-align: right; font-size: 12px">
				<span style="margin-right: 70%;font-size: 24px;">光伏电站监控管理系统-后台管理</span>
				<el-dropdown>
					<i class="el-icon-setting" style="margin-right: 15px"></i>
					<el-dropdown-menu slot="dropdown">
						<el-dropdown-item>查看</el-dropdown-item>
						<el-dropdown-item>新增</el-dropdown-item>
						<el-dropdown-item>删除</el-dropdown-item>
					</el-dropdown-menu>
				</el-dropdown>
				<span>李洋洋</span>
			</el-header>
			<el-main>
				<router-view></router-view>
			</el-main>
		</el-container>
	</el-container>

</template>

<script>
	import request from '../utils/axios/request.js';
	export default {
		data() {

			return {

			}
		},
		methods: {
			handleSelect(key, keyPath) {
				// console.log(key, keyPath);
			},
			findEquipment: function() {
				this.$router.push('/adminIndex2')
			},
			addEquipments: function() {
				this.$router.push('/adminIndex2/addequip')
			},
			underEquipment: function() {
				this.$router.push('/adminIndex2/underequip')
			},
			updateEquipment: function() {
				this.$router.push('/adminIndex2/updateEquipment')
			},
			findEquipmentById: function() {
				this.$router.push('/adminIndex2/findEquipmentById')
			},
			findByExample: function() {
				this.$router.push('/adminIndex2/findByExample')
			},
			findNotice: function() {
				this.$router.push('/adminIndex2/notice')
			},
			deleteEquipment: function() {
				this.$router.push('/adminIndex2/deleteEquipment')
			}
		}
	};
</script>

<style>
	.el-header {
		background-color: #B3C0D1;
		color: #333;
		line-height: 60px;
	}

	.el-aside {
		color: #ff0000;
	}

	.el-main {
		background-color: #ffffff;
		color: #333;
		text-align: center;
		line-height: 60px;
	}
</style>